<script type="text/javascript">
  function PrintDiv() {    
           var divToPrint = document.getElementById('print');
           var popupWin = window.open('', '_blank', 'width=800,height=800');
           popupWin.document.open();
           popupWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</html>');
            popupWin.document.close();
                }
</script>
<div align="right">
<form method="post" action="<?=site_url('enquiry/enquiry/approved_enquiry')?>" >
<input type="hidden" name="customer_enq_id" value="<? echo $enquiry['customer_enquiry_no']  ?>"/>
<input type="hidden" name="enquiry_id" value="<? echo $enquiry['id']?>"/>
<input type="submit" class="btn-success" value="<?php if($enquiry['status']=='pending'     ){echo"APPROVED" ; }  else{echo "View Detail";}                  ?>" name="approved">
</form>
<input type="button" class="btn-inverse" value="Print" onclick="PrintDiv();">
</div>
<div class="row-fluid" id="print">
<p align="center"><h3 align="center">
ENQUIRY DETAIL</h3></p>
<div class="span1">&nbsp;&nbsp; </div>
<div class="span10">
<div class="row-fluid"> 
<div class="span12">
<table border="1px" width="100%">
		<tr>
            <td><?php  echo "<strong>".$profile['name']."</strong><br>";
	echo $profile['address']."<br>";
	echo $profile['email']."<br>";
	echo $profile['phone_no']."<br>"; ?></td>
		<td>
		<table border="1px" width="100%">
		<tr>
            <td>Enquiry No<br><?php echo '<strong>'.$enquiry['customer_enquiry_no'].'</strong>'; ?></td>
			<td>Dated<br><?php echo '<strong>'.$enquiry['view_date'].'</strong>'; ?></td>
			<td>Expected Dated<br><?php echo '<strong>'.$enquiry['expected_date'].'</strong>'; ?></td>
		</tr>
		

		
		</table>
		</td>
		</tr>
		<tr>
		
            <td><h4><b>Enquirer Details</h4><?php 
			 echo "<strong>".$customer['name']."</strong><br>";
	echo $customer['address']."<br>";
	echo $customer['email']."<br>";
	echo $customer['phone']."<br>"; ?>
	 </td>
				<td>
		<table border="1px" width="100%">

		<tr>
           <th>Enquired By</th>
		    <th>Enquiry Status</th>
		</tr>
         <tr><td align="center"><?php echo '<strong>'.$enquiry['enquired_by'].'</strong>'; ?></td>
		     <td align="center"><?php  echo '<strong>'.$enquiry['status'].'</strong>';   ?></td>
		</table>
		</td>

		</tr>

</table>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span12" >
<table border="1px" width="100%">
	<thead>
    <tr>
		<th>Product Name</th>
		<th>Product Code</th>
		<th>Quantity</th>
       	
	</tr>
    </thead><tr><?php foreach ($product as $pro){?>
	<td><?php echo $pro->name;?></td>
	<td><?php echo $pro->code;?></td>
	<td><?php echo $pro->quantity;?></td>
	</tr><?}?>
</table>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<table width="100%">
<tr><td width="50%">
<table  width="100%">
	<tr><td width="100%"  ><div onclick="show_tb_row()"  id="text"> </div>
	
	</td></tr>
</table>
</td>

<td width="50%" >
</td></tr>
</table>
<table width="100%">
<tr><td width="50%">
</td>

</tr>
</table>



 </div>
 
</div>
<br><br>

</div>
</div>